package be.myandroid.games.menu;

import java.util.Timer;
import java.util.TimerTask;

import javax.microedition.khronos.opengles.GL10;

import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import be.myandroid.games.StateManager;
import be.myandroid.games.spritetext.LabelMaker;
import be.myandroid.games.spritetext.Projector;

public class WonMenu extends AbstractMenu {
	
	GameMenuItem wonLabel;
	
	@Override
	public void initialize(GL10 gl, Drawable background, LabelMaker parent,
			Paint paint) {
		wonLabel = new GameMenuItem("Congratulations!"){
			@Override
			public void OnClick() {
				StateManager.getInstance().currentGame.reset();
			}
		};
		Paint customP = new Paint();
		customP.setTextSize(60);
		customP.setAntiAlias(true);
		customP.setARGB(0xff, 0x00, 0xFF, 0x00);
		
		wonLabel.initialize(gl, parent, customP);		
	}

	@Override
	protected void layoutItems(float mWidth, float mHeight) {
		wonLabel.layout(mWidth, mHeight);
	}

	@Override
	public void draw(GL10 gl, LabelMaker mLabels, Projector mProjector) {
		wonLabel.draw(gl, mLabels, mProjector);
	}

}
